package lwk.function;

import java.util.function.Function;
import java.util.function.Predicate;

/**
 * @author:lwk
 * @create: 2022-08-18 22:20
 * @Description: Predicate断定型接口
 */
public class Demo02 {
    public static void main(String[] args) {

//        Predicate<String> predicate = new Predicate<>() {
//            @Override
//            public boolean test(String s) {
//                return s.isEmpty();
//            }
//        };

//        Predicate<String> predicate = s -> s.isEmpty();

        Predicate<String> predicate = String::isEmpty;

        System.out.println(predicate.test("test test"));
    }
}
